package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/7/12.
 */
public class GuideGetTicketsAction extends AHttpService<PbBean.PbResGuideGetGuideTicketList> {

    public static GuideGetTicketsAction newInstance(Context context, int offset) {
        return new GuideGetTicketsAction(context, offset);
    }

    private int offset;

    private GuideGetTicketsAction(Context context, int offset) {
        super(context);
        this.offset = offset;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqGuideGetGuideTicketList.Builder builder = PbBean.PbReqGuideGetGuideTicketList.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setOffset(offset);

        return apiService.getGuideTicketList(builder.build());
    }
}
